package com.ourteam.workspace.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2018-11-30 16:49:59
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class WorkspaceConfigBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.workspace.dao.WorkspaceConfig workspaceConfig;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(workspaceConfig);
	}
	
	static{
				
																
		mappedDaoFields.put("configItem",com.ourteam.workspace.dao.IWorkspaceConfigDAO.ConfigItem);
		
																										
				
																				
		mappedDaoFields.put("description",com.ourteam.workspace.dao.IWorkspaceConfigDAO.Description);
		
																						
				
												
		mappedDaoFields.put("id",com.ourteam.workspace.dao.IWorkspaceConfigDAO.Id);
		
																														
				
																								
		mappedDaoFields.put("parentConfigId",com.ourteam.workspace.dao.IWorkspaceConfigDAO.ParentConfigId);
		
																		
				
																												
		mappedDaoFields.put("status",com.ourteam.workspace.dao.IWorkspaceConfigDAO.Status);
		
														
				
																																
		mappedDaoFields.put("configForm",com.ourteam.workspace.dao.IWorkspaceConfigDAO.ConfigForm);
		
										
				
																																				
		mappedDaoFields.put("configName",com.ourteam.workspace.dao.IWorkspaceConfigDAO.ConfigName);
		
						
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public WorkspaceConfigBean() {
		super();
	    		
		this.workspaceConfig = new com.ourteam.workspace.dao.WorkspaceConfig();
                
	}
	
		
	public WorkspaceConfigBean(com.ourteam.workspace.dao.WorkspaceConfig workspaceConfig) {
		super();
	
		this.workspaceConfig = workspaceConfig;
		
	}
		
		
		
    	
	public com.ourteam.workspace.dao.WorkspaceConfig convertToWorkspaceConfig(){
		return this.workspaceConfig;
	}
	
	public com.ourteam.workspace.dao.WorkspaceConfig convertTo(){
		return this.workspaceConfig;
	}
	
			
		
					
			
		
	/**
	 * Get configItem
	 * 
	 * @return String
	 */
	public String getConfigItem(){
		return (String) this.workspaceConfig.getConfigItem();
	}
	
	/**
	 * Set configItem
	 * 
	 * @parameter String
	 */
	public void setConfigItem(String configItem){
		
		this.workspaceConfig.setConfigItem(configItem);
	}
		
													
		
		
							
			
		
	/**
	 * Get description
	 * 
	 * @return String
	 */
	public String getDescription(){
		return (String) this.workspaceConfig.getDescription();
	}
	
	/**
	 * Set description
	 * 
	 * @parameter String
	 */
	public void setDescription(String description){
		
		this.workspaceConfig.setDescription(description);
	}
		
											
		
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.workspaceConfig.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.workspaceConfig.setId(id);
	}
		
															
		
		
									
			
		
	/**
	 * Get parentConfigId
	 * 
	 * @return long
	 */
	public long getParentConfigId(){
		return (long) this.workspaceConfig.getParentConfigId();
	}
	
	/**
	 * Set parentConfigId
	 * 
	 * @parameter long
	 */
	public void setParentConfigId(long parentConfigId){
		
		this.workspaceConfig.setParentConfigId(parentConfigId);
	}
		
									
		
		
											
			
		
	/**
	 * Get status
	 * 
	 * @return String
	 */
	public String getStatus(){
		return (String) this.workspaceConfig.getStatus();
	}
	
	/**
	 * Set status
	 * 
	 * @parameter String
	 */
	public void setStatus(String status){
		
		this.workspaceConfig.setStatus(status);
	}
		
							
		
		
													
			
		
	/**
	 * Get configForm
	 * 
	 * @return String
	 */
	public String getConfigForm(){
		return (String) this.workspaceConfig.getConfigForm();
	}
	
	/**
	 * Set configForm
	 * 
	 * @parameter String
	 */
	public void setConfigForm(String configForm){
		
		this.workspaceConfig.setConfigForm(configForm);
	}
		
					
		
		
															
			
		
	/**
	 * Get configName
	 * 
	 * @return String
	 */
	public String getConfigName(){
		return (String) this.workspaceConfig.getConfigName();
	}
	
	/**
	 * Set configName
	 * 
	 * @parameter String
	 */
	public void setConfigName(String configName){
		
		this.workspaceConfig.setConfigName(configName);
	}
		
			
		
			
			
			
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof WorkspaceConfigBean) == false) {
            return false;
        } // end if

        WorkspaceConfigBean other = (WorkspaceConfigBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.workspace.dao.WorkspaceConfig tempWorkspaceConfig = other.convertToWorkspaceConfig();
        
        if(tempWorkspaceConfig == null || this.workspaceConfig == null){
        	isEqual = false;
        }
        else if(tempWorkspaceConfig == this.workspaceConfig || tempWorkspaceConfig.equals(this.workspaceConfig) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static WorkspaceConfigBean[] toArray(com.ourteam.workspace.dao.WorkspaceConfig[] aWorkspaceConfigs){
		
		return toArray(aWorkspaceConfigs,null);
	}
	
	public static WorkspaceConfigBean[] toArray(com.ourteam.workspace.dao.WorkspaceConfig[] aWorkspaceConfigs , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aWorkspaceConfigs)){
		 	return new WorkspaceConfigBean[0];
		 }
		 
		 int length = aWorkspaceConfigs.length;
		 
		 WorkspaceConfigBean[] beans = new WorkspaceConfigBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new WorkspaceConfigBean(aWorkspaceConfigs[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aWorkspaceConfigs[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}